/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "far_contacto")
@NamedQueries({
    @NamedQuery(name = "FarContacto.findAll", query = "SELECT f FROM FarContacto f")})
public class FarContacto implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "fct_id")
    private Integer fctId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 64)
    @Column(name = "fct_apellidos")
    private String fctApellidos;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 64)
    @Column(name = "fct_nombres")
    private String fctNombres;
    @Size(max = 10)
    @Column(name = "fct_cedula")
    private String fctCedula;
    @Size(max = 16)
    @Column(name = "fct_telefono")
    private String fctTelefono;
    @Size(max = 128)
    @Column(name = "fct_mail")
    private String fctMail;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fct_estado")
    private int fctEstado;
    @OneToMany(mappedBy = "farContacto", fetch = FetchType.LAZY)
    private List<FarProovedor> farProovedorList;

    public FarContacto() {
    }

    public FarContacto(Integer fctId) {
        this.fctId = fctId;
    }

    public FarContacto(Integer fctId, String fctApellidos, String fctNombres, int fctEstado) {
        this.fctId = fctId;
        this.fctApellidos = fctApellidos;
        this.fctNombres = fctNombres;
        this.fctEstado = fctEstado;
    }

    public Integer getFctId() {
        return fctId;
    }

    public void setFctId(Integer fctId) {
        this.fctId = fctId;
    }

    public String getFctApellidos() {
        return fctApellidos;
    }

    public void setFctApellidos(String fctApellidos) {
        this.fctApellidos = fctApellidos;
    }

    public String getFctNombres() {
        return fctNombres;
    }

    public void setFctNombres(String fctNombres) {
        this.fctNombres = fctNombres;
    }

    public String getFctCedula() {
        return fctCedula;
    }

    public void setFctCedula(String fctCedula) {
        this.fctCedula = fctCedula;
    }

    public String getFctTelefono() {
        return fctTelefono;
    }

    public void setFctTelefono(String fctTelefono) {
        this.fctTelefono = fctTelefono;
    }

    public String getFctMail() {
        return fctMail;
    }

    public void setFctMail(String fctMail) {
        this.fctMail = fctMail;
    }

    public int getFctEstado() {
        return fctEstado;
    }

    public void setFctEstado(int fctEstado) {
        this.fctEstado = fctEstado;
    }

    public List<FarProovedor> getFarProovedorList() {
        return farProovedorList;
    }

    public void setFarProovedorList(List<FarProovedor> farProovedorList) {
        this.farProovedorList = farProovedorList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fctId != null ? fctId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FarContacto)) {
            return false;
        }
        FarContacto other = (FarContacto) object;
        if ((this.fctId == null && other.fctId != null) || (this.fctId != null && !this.fctId.equals(other.fctId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.FarContacto[ fctId=" + fctId + " ]";
    }
    
}
